﻿Imports Microsoft.VisualBasic


'Clase abstracta
Public MustInherit Class Baraja

    Protected Static Const REVERSO As String = "reverso"
    Protected Mazo As mazo = null

    Protected idACarta As Hashtable()
    Protected iconos As Hashtable()


    Protected Sub New(ByVal reversoBaraja As Image)
        reverso = reversoBaraja
    End Sub

    Public Property reverso() As Image
        Get
            Return reverso
        End Get
        Set(ByVal value As Image)
            reverso = value
        End Set
    End Property

    Public Function generaMazo() As Mazo
        Return New Mazo(mazo)
    End Function

    Public Function cartaParaId(ByVal id As String) As Carta
        Return idACarta.get(id)
    End Function

    Public Function imagenParaCarta(ByVal c As Carta) As Image
        Return iconos.get(c)
    End Function

    Public Function imagenReverso() As Image
        Return iconos.get(REVERSO)
    End Function



End Class
